<template>
	<view class="contain">
		<view>
			<form>
				<view class="cu-form-group">
					<view class="title">客户名称</view>
					<input class="inpt"  name="input"></input>
				</view>
				<view class="cu-form-group">
					<view class="title">价格等级</view>
					<picker @change="PickerChange" :value="index" :range="picker">
						<view class="picker">
							{{index>-1?picker[index]:'批发客户'}}
						</view>
					</picker>
				</view>
				<view class="cu-form-group margin-top">
					<view class="title">联系人</view>
					<input class="inpt"  name="input"></input>
					<text class='cuIcon-addressbook text-blue '></text>
				</view>
				<view class="cu-form-group">
					<view class="title">手机</view>
					<input class="inpt"  name="input"></input>
				</view>
				<view class="cu-form-group">
					<view class="title">电话</view>
					<input class="inpt"  name="input"></input>
				</view>
				<view class="cu-form-group">
					<view class="title">送货地址</view>
					<input class="inpt"  name="input"></input>
					<text class='cuIcon-locationfill text-blue'></text>
				</view>
				<view class="cu-form-group margin-top">
					<view class="title">应收款</view>
					<input class="inpt"  name="input" :value="yskvalue"></input>
				</view>
				<view class="cu-form-group">
					<view class="title">初始应收款</view>
					<input class="inpt"  name="input" disabled="true" :value="csyskvalue"></input>
				</view>
				<!-- <view class="cu-form-group">
					<view class="title">手机号码</view>
					<input placeholder="输入框带标签" name="input"></input>
					<view class="cu-capsule radius">
						<view class='cu-tag bg-blue '>
							+86
						</view>
						<view class="cu-tag line-blue">
							中国大陆
						</view>
					</view>
				</view>	 -->
				<view class="cu-form-group align-start margin-top">
					<view class="title">备注</view>
					<textarea maxlength="-1" @input="textareaBInput" ></textarea>
				</view>
				<view class="footer">
					<view class="footer-box">
						<button class="btn stop text-white">停用</button>
						<button class="btn del" type="warn">删除</button>
					</view>
				</view>
			</form>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				index: 0,
				picker: ['批发客户', '零售客户', '批发价1客户'],
				csyskvalue: 0,
				yskvalue: 0,
			}
		},
		methods: {
			PickerChange(e) {
				console.log(e)
				this.index = e.detail.value
			}
		}
	}
</script>

<style>
	page {
		background: #f5f1f1;
	}
	.cu-form-group{
		border-top: 0.5px solid #E1D7F0;
	}
	

	.inpt {
		text-align: right;
	}

	.footer {
		width: 100%;
	}

	.footer-box {
		display: flex;
		position: fixed;
		bottom: 0;
		width: inherit;
		margin-bottom: 6px;
	}

	.btn {
		width: 45%;
		font-size: 16px;
	}

	.stop {
		background-color: rgb(96, 188, 204);
	}
	
</style>
